package com.budwk.app.sqfw.services.communityservice;

import com.budwk.app.sqfw.models.SqfwNotice;
import com.budwk.app.sqfw.vo.GenerateExcelUrlVO;
import com.budwk.app.sqfw.vo.GenerateWordAndPdfUrlVO;
import com.budwk.app.sqfw.vo.SqfwNoticeForAdminVO;
import com.budwk.app.sqfwDoc.bo.ExcelCreateConfig;
import com.budwk.starter.common.page.Pagination;
import com.budwk.starter.database.service.BaseService;
import org.nutz.dao.sql.Criteria;

import java.util.List;

/**
 * 社区公告服务（后台管理系统）
 */
public interface SqfwNoticeForAdminService extends BaseService<SqfwNotice> {

    /**
     * 列表查询
     *
     * @param sqfwNoticeForAdminVO
     * @return Pagination
     */
    Pagination list(SqfwNoticeForAdminVO sqfwNoticeForAdminVO, int pageNo, int pageSize, String pageOrderName, String pageOrderBy);

    /**
     * 删除
     *
     * @param id
     */
    int delete(String id);

    /**
     * 详情查询
     * @param id
     */
    SqfwNotice detail(String id);

    /**
     * 修改
     *
     * @param sqfwNoticeForAdminVO
     */
    int update(SqfwNoticeForAdminVO sqfwNoticeForAdminVO);

    /**
     * 下载excel
     *
     * @param sqfwFormSummaryForAdminVO
     * @return 文件下载地址
     */
    List<GenerateExcelUrlVO> downloadExcel(List<ExcelCreateConfig> excelConfigList, SqfwNoticeForAdminVO sqfwFormSummaryForAdminVO);

    /**
     * 下载pdf
     *
     * @param sqfwFormSummaryForAdminVO
     * @return 文件下载地址
     */
    GenerateWordAndPdfUrlVO downloadPdf(List<ExcelCreateConfig> excelConfigList, SqfwNoticeForAdminVO sqfwFormSummaryForAdminVO);


    /**
     * 构建查询条件
     *
     * @param bean
     * @return
     */
    Criteria buildQueryCond(SqfwNoticeForAdminVO bean);
}
